package br.com.moxeon.model.financialaccounts;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import br.com.moxeon.model.Bank;


@SuppressWarnings("serial")
@Entity
@DiscriminatorValue(value = "BA")
public class BankAccount extends FinancialAccount {

	private String number;

	private String agency;

	@ManyToOne(fetch=FetchType.LAZY,targetEntity=TypeBankAccount.class)
	@JoinColumn(name = "type_bank_account_id")
	private TypeBankAccount typeBankAccount;

	private String maneger;

	@Column(name = "maneger_phone")
	private String manegerPhone;

	@ManyToOne(cascade = CascadeType.ALL, targetEntity = Bank.class, fetch = FetchType.LAZY)
	private Bank bank;
	
	private String purpose;

	public String getPurpose() {
		return purpose;
	}

	public void setPurpose(String purpose) {
		this.purpose = purpose;
	}

	@Column(name="account_limit")
	private Double limit;

	@Column(name="percent_limit")
	private double percentLimit;

	private Date maturity;

	@Column(name = "interest_limit")
	private double interestLimit;

	@Column(name = "debit_day")
	private Integer debitDay;

	public String getNumber() {
		return number;
	}

	public String getAgency() {
		return agency;
	}

	public TypeBankAccount getTypeBankAccount() {
		return typeBankAccount;
	}

	public String getManeger() {
		return maneger;
	}

	public String getManegerPhone() {
		return manegerPhone;
	}

	public Bank getBank() {
		return bank;
	}

	public Double getLimit() {
		return limit;
	}

	public double getPercentLimit() {
		return percentLimit;
	}

	public Date getMaturity() {
		return maturity;
	}

	public double getInterestLimit() {
		return interestLimit;
	}

	public Integer getDebitDay() {
		return debitDay;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	public void setAgency(String agency) {
		this.agency = agency;
	}

	public void setTypeBankAccount(TypeBankAccount typeBankAccount) {
		this.typeBankAccount = typeBankAccount;
	}

	public void setManeger(String maneger) {
		this.maneger = maneger;
	}

	public void setManegerPhone(String manegerPhone) {
		this.manegerPhone = manegerPhone;
	}

	public void setBank(Bank bank) {
		this.bank = bank;
	}

	public void setLimit(Double limit) {
		this.limit = limit;
	}

	public void setPercentLimit(double percentLimit) {
		this.percentLimit = percentLimit;
	}

	public void setMaturity(Date maturity) {
		this.maturity = maturity;
	}

	public void setInterestLimit(double interestLimit) {
		this.interestLimit = interestLimit;
	}

	public void setDebitDay(Integer debitDay) {
		this.debitDay = debitDay;
	}

}